package cn.edu.scau.cmi.wujiaming.experiment3.simpleFactory;

public class SFM_Factory {
	
	public static Insurance createInsurance(String name) {
		
		if (name == null)
			return null;
		switch (name) {
		case "司机受伤":
			return new DriverInjured();
		case "汽车损坏":
			return new AutomobileDamage();
		case "人员伤亡":
			return new PersonalCasualty();
		case "多种事故":
			return new MultipleAccidents();
		}
		return null;
	}
}
